<?php
class start extends Controller {
	
	public $viewData;
	
	function start() {
		parent::Controller();
		
		$this->viewData->title = "CartPool";
		$this->viewData->description = "Collaborative shopping";
		$this->viewData->keywords = "CartPool, shoppingcart";

		$this->viewData->css = array("reset", "960", "cartpool_style");
		
		$this->viewData->js = array(	"jquery-1.3.2.min", 
										"cufon-yui", 
										"segoe_400.font", 
										"jquery.history_remote.min", 
										"jquery.autofill",
										"jquery.form", 
										"cartpool_common", 
										"cartpool_login");
		
		$this->load->library('cartpool');
	}
	
	function index($loginError = null) {
		if($loginError){
			$this->viewData->loginError = $this->cartpool->errors[$loginError];
			echo $loginError;
		}
		
		$this->viewData->cartpoolData = $this->cartpool->getCartpoolData();

		$this->load->helper('url');
		$this->viewData->uriString = uri_string();
		
		
		$this->viewData->topInfo_html = $this->load->view('top_info', $this->viewData, true);
		$this->viewData->navigation_html = $this->load->view('navigation', $this->viewData, true);
		$this->viewData->leftColumn_html = $this->load->view('register_login', $this->viewData, true);
		$this->viewData->rightColumn_html = $this->load->view('home_content', $this->viewData, true);

		$this->load->view('index', $this->viewData);
	}
}